package org.cypress.rtpack.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.cypress.rtpack.entity.RtpackModel;
import org.cypress.rtpack.mapper.RtpackModelMapper;
import org.cypress.rtpack.service.IRtpackModelService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Function;
import java.util.stream.Collectors;


/**
 * @author getty
 */
@Service
public class RtpackModelServiceImpl extends ServiceImpl<RtpackModelMapper, RtpackModel> implements IRtpackModelService {


    @Override
    @Transactional(readOnly = true)  // 自动管理连接生命周期
    public List<RtpackModel> getAll() {
        LambdaQueryWrapper<RtpackModel> queryWrapper = new LambdaQueryWrapper<>();
        List<RtpackModel> rtpackModelList = this.getBaseMapper().selectList(queryWrapper);
        return rtpackModelList;
    }

}
